/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.sys.domain;

import com.msk.wlhy.domain.Area;
import org.hibernate.validator.constraints.Length;

import java.util.List;

/**
 * 机构Entity
 *
 * @author ThinkGem
 * @version 2013-05-15
 */
public class Office extends TreeDomain<Office> {

    private static final long serialVersionUID = 1L;
    // private Office parent; // 父级编号
    // private String parentIds; // 所有父级编号

    private String code; // 机构编码
    private String newCode; // 机构编码
    // private String name; // 机构名称
    // private Integer sort; // 排序

    private String type; // 机构类型（1：公司；2：部门；3：小组）
    private String grade; // 机构等级（1：一级；2：二级；3：三级；4：四级）

    private String address; // 联系地址
    private String zipCode; // 邮政编码

    private String master;

    private String phone;
    private String fax; // 传真

    private int wechatId; // 微信部门Id
    private String email; // 邮箱

    private String useable;// 是否可用
    private User primaryPerson;// 主负责人
    private User deputyPerson;// 副负责人
    private List<String> childDeptList;// 快速添加子部门
    private String classGrade;
    private String isChoose;//注册时是否可选择
    //归属区域
    private Area area;
    public Office() {
        super();
        // this.sort = 30;
        this.type = "2";
    }

    public Office(String id) {
        super(id);
    }

    public String getClassGrade() {
        return classGrade;
    }

    public void setClassGrade(String classGrade) {
        this.classGrade = classGrade;
    }

    public List<String> getChildDeptList() {
        return childDeptList;
    }

    public void setChildDeptList(List<String> childDeptList) {
        this.childDeptList = childDeptList;
    }

    public String getUseable() {
        return useable;
    }

    public void setUseable(String useable) {
        this.useable = useable;
    }

    public User getPrimaryPerson() {
        return primaryPerson;
    }

    public void setPrimaryPerson(User primaryPerson) {
        this.primaryPerson = primaryPerson;
    }

    public User getDeputyPerson() {
        return deputyPerson;
    }

    public void setDeputyPerson(User deputyPerson) {
        this.deputyPerson = deputyPerson;
    }

    public Office getParent() {
        return parent;
    }

    public void setParent(Office parent) {
        this.parent = parent;
    }

    @Length(min = 1, max = 1)
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Length(min = 1, max = 1)
    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    @Length(min = 0, max = 255)
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Length(min = 0, max = 100)
    public String getZipCode() {
        return zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    @Length(min = 0, max = 100)
    public String getMaster() {
        return master;
    }

    public void setMaster(String master) {
        this.master = master;
    }

    @Length(min = 0, max = 200)
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Length(min = 0, max = 200)
    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public int getWechatId() {
        return wechatId;
    }

    public void setWechatId(int wechatId) {
        this.wechatId = wechatId;
    }

    @Length(min = 0, max = 200)
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Length(min = 0, max = 100)
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    // public String getParentId() {
    // return parent != null && parent.getId() != null ? parent.getId() : "0";
    // }
    public Area getArea() {
        return area;
    }

    public void setArea(Area area) {
        this.area = area;
    }
    @Override
    public String toString() {
        return name;
    }


    public String getLogTitle() {
        // TODO Auto-generated method stub
        return "部门管理";
    }

	public String getNewCode() {
		return newCode;
	}

	public void setNewCode(String newCode) {
		this.newCode = newCode;
	}

	public String getIsChoose() {
		return isChoose;
	}

	public void setIsChoose(String isChoose) {
		this.isChoose = isChoose;
	}

}